#ifndef __CHARNOE__
#define __CHARNOE__

#include "character.h"

#include "consts.h"

/*! \brief Bullet data class.
*
* Every bit of information about fired bullet should go there.
*/
class Bullet {
  public:
    /*! \brief Class constructor.
    *
    * \param speedx Horizontal speed (negative value to let the bullet go left)
    * \param speedy Vertical speed (negative value to let the bullet go down)
    * \param life Lifespan of the bullet (frames)
    * \param damage Amount of damage the bullet will do
    */
    Bullet(int speedx, int speedy, int life, int damage);
    
    /**
    * integer.
    * Horizontal speed (a negative value will make the bullet go left).
    */
    int _speedx;
    /**
    * integer.
    * Vertical speed (a negative value will make the bullet go down).
    */    
    int _speedy;
    /**
    * integer.
    * Lifespan of the bullet.\  1 unit = 1 frame
    */
    int _life;
    /**
    * integer.
    * Amount of damage the bullet will do on collision.
    */
    int _damage;
};
/*! \brief Weapon data class.
*
* Every bit of information about weapons should go there
*/
class Weapon {
 public:
    /*! \brief Class constructor.
    *
    * Weapon handler.
    * \param id is the Weapon ID
    * \param slot is the slot in which the weapon will be stored)
    */
    Weapon(int id, int slot);
    /**
    * integer.
    * Weapon ID (warning it has to do with graphics, see weapons_readme.txt).
    */
    int _id;
    /**
    * integer.
    * Weapon slot.
    */
    int _slot;
    /**
    * integer.
    * Depending on the weapon, the height of the bullet when it appears is different.
    */
    int _bulletY;
    /**
    * integer array.
    * This is to positionate correctly the system {arms+weapon} on the body
    */
    int _standX[2];
    /**
    * integer.
    * This is to positionate correctly the system {arms+weapon} on the boddy
    */
    int _standY;
    /**
    * integer.
    * Number of bullet the weapon will spread.
    */
    int _bulletAmount;
    /**
    * integer.
    * Number of ammo the weapon will have when the character loots it
    * (-1 for infinite ammos)
    */
    int _ammo;
    /**
    * Bullet Object array.
    * A single weapon can shoot different bullets heading different direction.
    * (e.g. the shotgun spreads 3 bullets covering a wide area)
    */
    Bullet * _bulletArr[5];

};
/*! \brief Character : Noe class.
*
*/
class CharacterNoe : public Character {
  public:
    /*! \brief Class constructor.
    *
    * Load every bitmap, initialize the Weapon's HUD, and some minor setups.
    */
    CharacterNoe();
    /*! \brief Class destructor.
    *
    * Free the memory.
    */
    ~CharacterNoe();
    BITMAP * __getSprite();
    void __readKeyboard();
    void __update();
    /*! \brief Fire the weapon
    *
    */
    void __fire();
    void __getItem(int id, int value1 = 0, int value2 = 0, int value3 = 0);
    /*! \brief Add the weapon to the player's inventory
    *
    */
    int __addWeapon(int wepid);
    void __linkHUD(vector<HUD *>* HUDVec);

  private:
    AnimatedSprite * _weaponPack;
    BITMAP * _spriteBuffer;
    BITMAP * _alphaBitmap;

    int _keyPressed;
    void __nextWeapon();
    Weapon * _weapons[4];
    Weapon * _mainWeapon;
    HUD * _HUDWeapons;
    HUD * _HUDAmmo;    
};

#endif
